package abc.dev;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@EnableDiscoveryClient
@LoadBalancerClient(value = "service-abc")
@MapperScan(value = {"abc.*"})
@EnableFeignClients(basePackages = {"abc.dev.*.client"})
@SpringBootApplication(scanBasePackages = {"abc.*"})
public class ServiceAbcApplication {

    public static void main(String[] args) {
        run(null, args);
    }

    public static void run(Class clazz, String[] args) {
        SpringApplication app = new SpringApplication(ServiceAbcApplication.class);

        if(clazz == null) {
            app.run(args);
        }

        else {
            app.run(clazz, args);
        }
    }
}
